{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# User's Guide, Chapter 27: Grace Notes\n",
    "\n",
    "Grace notes present particular problems for almost all computer representations of scores.  In one way of theorizing them, they take up no time whatsoever -- you can take a full measure of 4/4 and add two hundred grace notes and the measure is still not over full.  On the other hand, they need to take up some time, otherwise how would we hear them?\n",
    "\n",
    "So we have something that takes up no time, but takes up time, at the same time.  Let's look more closely at them.  Along the way we'll look at appogiature, which present some issues that are similar and some that are different.\n",
    "\n",
    "## Basic Graces\n",
    "\n",
    "We'll begin by creating a 4/4 measure of four quarter notes:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZUAAABiCAYAAACYu04uAAAACXBIWXMAAB7CAAAewgFu0HU+AAAQ\nuElEQVR4nO3de7AcZZnH8e9JhiSHhFwgBAmQBCEQAgQEIUhQskHMIop4BQov7JK1pNY7tWt5AVxl\nEQtW1NJFXCmiq6ylXCKW4LpyUcNNSlYRSAwrBOSaIAmBE5Kck8z+8XSne3r68s5MX2bO/D5VXdPT\n8870e96czHO63/d9XijPEmA9MATML/G8IiIyynwAGAbq3vYQMFhpjUREpCedCWwnCCj+dkmVlRIR\nkd5zDLCV5oBS947Pq65qIiLSS6YAjxIfUPztxspqJyIiPeUK0gNKHdgBHFlVBUVEpDfMBbaRHVTq\nwI8qqqOIiPSIa8gOJhu8x2FgZjXVFBGRbjeT5M75OnYFczkwFXjGO/b5KioqIiLd73ySA8pTwPGh\nst/3jj9Wch1FRKRHrCQ+oKwGXhUp+7HQ668rsY4iItIDJgAjNAeUx4jvN1kSKvPVkuooIiI94rXE\n96Eck1D+ABqvZERERHY6m+agcmFK+WmRsvsUXUERESnOmJw/b1rk+dPAZSnlN0een5BvdUREpEx5\nB5XdIs+/DLySUj6aqfjQfKsjIiJlyjuoDIT2t2FDhtNMjjw/JN/qiIhImfIOKjtC+/8DvJBR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XsImg\naell8qI0Le6WozQtrpSmxY3StLjbmaalRjChMS83YR33B2NXLXti/zhh27BhxluxRIB17OpmO+Wu\nCf82bKjwGq8+L2CTLDdgc1IGsNt407ArlWnYyLSjganYz1ik14bqOTutoOwcfn4eypiQZU+s7zPv\n//ujjb+I32zUVln29x7H1yguTfgagtUfxxB04A8TTGKcil3dDAD7Eb/8cJHuSzi+q7f5NmMpap6I\nlCs6xfrU0KPSuafz/71mkM9t3dFsF+z/pH6n0vnfWeNRW2XZhnWBVJ4h/FUEt5X0l3gz3f5ytxzd\n/nKl219udPurDVWvchge2bVbZbUQEZFcVB1Uwotexa1vIiIiPaTToPImbD7JOixA/AkbDpyVDsUX\nThDZyqRJERHpQu12aNaA7wAfiBw/CJtlvxRbez7rvu240H5clmIREekh7V6pfIPmgBK2iGBNlTTh\nW15aiVFEpMe1E1QW4LaOyHux7MNpwp3zZaVjERGRgrQTVE7D5pVkGQBOyiizX2hfE9ZERHpcO0Gl\nlUlASevT+/zsxBuw9CciItLD2gkqG1som5V40U8iGbcksdgiZqCJai78NhpKLSVgbaTfqWzD3qY/\neAv2YdwSLw6TPkt+HHbLq46tdy/NasAJVD+fqBf4Odkk275k93eKOZTsOy7SoQW4BZVLMj5nWajs\n/KIqKyIi3e8xkoPJDmz537S/rieFPmNFoTUVEZGu9w8EQeQV4Erge8DFwJEO77/Ke+8IQcpyERHp\nU2NpXIxrBe73/T8Vet+nC6mdiIj0nFnY6C4/QNxO+nDjSdgSw375n+A230VERPrEAuBxgkAxhK1r\n8U5s1cIjgFOBK4BnQ+WupzHvl4iICAB7ATfgNiJsCLvlNbaSmoqISM84Dstc/DTNwWQVlr14VmW1\nExGRwv0/MsAJseXZUsQAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<IPython.core.display.Image object>"
      ]
     },
     "metadata": {
      "image/png": {
       "height": 49,
       "width": 202
      }
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "from music21 import *\n",
    "\n",
    "m = stream.Measure()\n",
    "m.append(meter.TimeSignature('4/4'))\n",
    "m.repeatAppend(note.Note('C5'), 4)\n",
    "m.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Now let's insert a D-grace note just before the third quarter note.  First we create a normal note (usually an eighth note) and then we create a new grace note with the `getGrace` method."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAc0AAABiCAYAAAAyeIiSAAAACXBIWXMAAB7CAAAewgFu0HU+AAAT\nOklEQVR4nO3debQcZZnH8e/N7YRcyE4IJDELYUsCSZAtkegQwhKUMWw6wnFUJHEOjDhsh/EYZZmR\nE3VAQQXjQg6gY8TRYIQzDuKIHHbkCLImhmESmEBCEkNIuFlvcuePp4quW11VXV1dS9/u3+ecPr29\n3fXcurf7uVXv+z4v5Gc2sAHoBCbnuF0REZFe5TPAbqDbubwEdBQakYiISAM6H9hDOWG6l4VFBiUi\nNTkXeA2YUHQgIs3seGAnlQmz23l8YnGhiUgNHsE+t2cUHYhIkfpk+N6DgZ8D/UKe7wd8LcPti4iI\npCrLpHk9cHCVNmcBR2cYg4iISGqySpqHAZ+P0a4NWJBRDCIiIqnKKmkuAPpWabPZuT4HGJVRHCKS\nroOKDkCk2YwifPBPN7ALuAkYAqx1Hru+iEBFJDZ3INA9RQci0myuIjxhvgGc6Gn7787jq3KOUURq\n4ybNTmBowbGINJVHCU6YK6g8tXOZ5/kP5BijiNTGTZrdwDcLjkWkafQHuqhMmKsI7rec7WlzS04x\nikjtvElzJ3B4seGINIfjCO7DPD6k/SH0PBIVkca0lJ6f6weLDUekOXySyqR5bUT7ob62o7MOUEQS\nuQH7jK6n/Hn9dEC7duBK4EP5hSbSe11K5cCfqMLs+/jafyLrAEUkETdpzgM2Uk6gwzxtpgPPOs89\nnneAInlIe57mQN/9bwDbI9r7E+qR6YYjIil7A5gL7AAOwJLpYOA24DFgGvAfwHlFBSjSmyyg52C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c3kLsNdSFEFE\nRCR3SaeclIDbgc/4Hj8cqxI0BzgDm3MZpZ/ndtAqJyIiIg0j6ZHmrVQmTK+ZlNfUjOI9Jbs9tJWI\niEgDSJI0pxJvHcm/x1YvieId/KM5ciIi0tCSJM252LzKatqwSjtRxnhur08Qi4iISG6SJM1aJs+O\nqPK8W43lbWBrglhERERykyRpbq6hbbXC5m6R9uUJ4mgFnc51tQFVktxWrHzjzmoNJZG92HgF/Q1n\n513ftTSYSylX8Ym67Ca6yk8/7JRsN7Agw3h7sxLwQYqfT9vMhgNTig6iyU3CFnGXbLRhgy/7VWso\nxZhKvKS5sMr7zPe0nZxVsCIiIkVbRXiy3AvcQvTR0QDPeyzLNFIREZGCfY5yktwOLAJ+DNwAHB3j\n9T9wXtsFTMsoRhERkYbQDvyJcuJcRvx+ty96XvelTKITERFpMGOx0bFuAvwD0dNRBgC3edr/mnjz\nPUVERJrCVOA1yomwE7gTOA84Djv1eiZwM7DO024pGuklIiIt6EDgHuKNqO3ETsm2FxKpiIhIg5iB\nrXzyJpXJcjm2+snYwqITERGp0/8DYSD3+wzZ0AIAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<IPython.core.display.Image object>"
      ]
     },
     "metadata": {
      "image/png": {
       "height": 49,
       "width": 230
      }
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "d = note.Note('D5', type='eighth')\n",
    "dGrace = d.getGrace()\n",
    "m.insert(2.0, dGrace)\n",
    "m.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "If we look at `dGrace` at first it appears to be just a normal Note:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<music21.note.Note D>"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "dGrace"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "But its `duration` is a subclass called `GraceDuration`.  Importantly, it is an \"unlinked\" duration, meaning that the `type` (e.g. \"eighth\") of the duration does not say how long it lasts."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<music21.duration.GraceDuration unlinked type:zero quarterLength:0.0>"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "dGrace.duration"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "False"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "dGrace.duration.linked"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "There is one `DurationTuple` in the `.components` of the GraceDuration object, and it is an eighth note of length 0."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(DurationTuple(type='eighth', dots=0, quarterLength=0.0),)"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "dGrace.duration.components"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "A GraceDuration has the boolean attribute `.slash` which says whether or not it receives a slash.  By default this is True."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "dGrace.duration.slash"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Within a `Stream` grace notes sort before elements of the same class that have the same priority and offset.  Internally, this is done by setting `isNotGrace` to 0 in the sort tuple. (normally it is 1)."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "SortTuple(atEnd=0, offset=2.0, priority=0, classSortOrder=20, isNotGrace=0, insertIndex=110)"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#_DOCS_SHOW dGrace.sortTuple()\n",
    "dGrace.sortTuple().modify(insertIndex=110) #_DOCS_HIDE"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Normally grace notes are slurred to the following note, so let's add a slur there."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAc0AAABiCAYAAAAyeIiSAAAACXBIWXMAAB7CAAAewgFu0HU+AAAT\nsklEQVR4nO3debQU5ZnH8e/lNgjKLiJoEFTcUMCICpE4Ii5onOAWRz2ZJEbIHB1N3I7jCXGbicck\no4lOoiGLRM0kxCSDEj1x0EyM44IaTzSuEBxHcVAQiCJ4WS/c+eOpsutWV1VXV9fSt/v3OadPb293\nPbfu7ft0vfW+zwv5mQ6sATqAcTluV0REpEf5ArAN6HIurwD9Co1IRESkAZ0DbKecMN3LjUUGJSI1\nOQNYDuxTdCAizewIYAuVCbPLefzA4kITkRo8jn1uTyo6EJEi9crwvQcBvwT6hDzfB/hGhtsXERFJ\nVZZJ83pg7yptTgUOzTAGERGR1GSVNPcDLorRrg2Yk1EMIiIiqcoqac4Beldps865Ph3YI6M4RCRd\nI4oOQKTZ7EH44J8uYCtwMzAYWOk8dn0RgYpIbO5AoHuLDkSk2VxBeMJ8GzjK0/ZnzuNv5ByjiNTG\nTZodwJCCYxFpKk8QnDCXUtm1c4nn+U/kGKOI1MZNml3AtwuORaRp9AU6qUyYbxB83nK6p82tOcUo\nIrXzJs0twP7FhiPSHA4n+BzmESHt96X7kaiINKYFdP9cP1JsOCLN4bNUJs1rI9oP8bXdM+sARSSR\nG7DP6GrKn9fPB7RrBy4Hjs4vNJGe62IqB/5EFWbfydf+7KwDFJFE3KQ5C1hLOYEO9bSZDDzvPLc4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VlzgXsg+MeyW2jXKRgMPB3WHIaRWWt2ayFVazf2bm4NmIlBN/ytctq\n37kGe66z3larcqchjcDOzUu63KTZB/0NZ8UdazEQ7eOsPA+8gJ1yLNQIyquI6EiqklY5yZ5WOcmW\nVjnJnlY5yVG9o2fr5e0OG1BYFCIiIjEUnTS9izoHrW8pIiLSMOpNmidi8ylXYwnwL9h0kWrl6lze\nAuy1FEUQERHJXdIpJyXgDuALvsf3x6oEzQBOwuZcRunjuR20yomIiEjDSHqkeRuVCdNrKuU1NaN4\nu2Q3hbYSERFpAEmS5gTirSP599jqJVG8g380R05ERBpakqQ5E5tXWU0bVmknyijP7dUJYhEREclN\nkqRZy+TZ4VWed6uxvA9sSBCLiIhIbpIkzXU1tK1W2Nwt0r4kQRytoMO5rjagSpLbgJVv3FKtoSSy\nAxuvoL/h7Hzou5YGczHlKj5Rl21EV/npg3XJdgFzMoy3JysBn6T4+bTNbBgwvuggmtxB2CLuko02\nbPBln2oNpRgTiJc0b6zyPrM9bcdlFayIiEjR3iA8We4AbiX66Ki/5z0WZhqpiIhIwb5EOUluAuYC\nPwVuAA6N8fofOq/tBCZmFKOIiEhDaAf+RDlxLiT+eberPK/7aibRiYiINJi9sNGxbgL8A9HTUfoD\nt3va/4Z48z1FRESawgRgOeVE2AHcBZwJHI51vZ4C3AKs8rRbgEZ6iYhIC9oduJd4I2o7sC7Z9kIi\nFRERaRBTsJVP3qEyWS7BVj/Zq7DoRERE6vT/Zm0VHbSXz1IAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<IPython.core.display.Image object>"
      ]
     },
     "metadata": {
      "image/png": {
       "height": 49,
       "width": 230
      }
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "thirdNote = m.notes[-2]\n",
    "sl = spanner.Slur(dGrace, thirdNote)\n",
    "m.insert(0, sl)\n",
    "m.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Multiple Grace Notes"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Multiple grace notes are normally beamed together and generally written as sixteenth or thirty-second notes.  We'll add two graces to the last C in the measure:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAhAAAABtCAYAAADwI1i/AAAACXBIWXMAAB7CAAAewgFu0HU+AAAW\nrElEQVR4nO3debQcZZnH8e9dkpCdNZAgJkOAQIghArJFMQQhLIossgmjjAkII4KKM2jEwVEMckBZ\nXIARkGECw2FYInpAVBYRgmwBEUhYlBAIS0L2hORmuXf+eKro6rpV1dXdtXX373NOn+6uru5+7n27\n+j633vd93g5ERESqtyswG9gL2AboApYAPXkGJSIiIsW2K5YseC/LgHuAC4CDgIG5RSciIiKFNJHe\nCYT/shF4CrgKOBHYIZdIRUREpDCOoHICEXR5A7gVOAcYl3nUIiIikqtDqC2B8F4eyjpoSU5n3gGI\niEhDesO5/i3wB6xLYyKwfRWvsVXSQYmIiEixuYMob/Rt3wEb73AlNv5hI+FnIJZlFKuIiIgUxEFY\nEvAosBvQHrLfQGASMB07W7EUJRAiIiItyz+IcimWIEzHEoYBIc9rx2pH9ACvph6liIiIFEqlWRgb\ngCeBK4ATKB8bMQgNomx4WQ+i3AL74LxRaUcREWloncDezuVcZ9sCrHrlU879thzikgY0GVgMrAHG\n5hyLiIjUp9Y6EP5uD5FIX8ROZ7kfmheA/rlGJCKNqB3oyDsIAWB37Pv8CeA2YCHVJxAaRCmRTgI2\n0fuDMyPPoESkId0LzMk7CAF6T+NsA0YCJwM/BZ4m+LtfCYTE8jFshbagD04X9gEUEYmrC1iddxAC\nhNeB8BqEdV9fgC2ytQwlEBLDUOAfRGefd+UWnYg0oi5sHJXkL04C4deOdX2c7Tz37eTDkmZwOZX7\nv7qBCXkFKCINpwtYl3cQAtSWQLg0jbMJhFUOq9fOwFdi7NeGFR0REYlLa/iIFEBaCcR0oE+FfZY7\n18cAI1KKQ0SaTwfwT3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F2e2/5xEiIiIlJQ\n9SYQh2L1GhZhycBL2BTMSiWjXd5Bk9UUoBIREZEc1VoHohO4Dviib/suWHXKKcBhWE2HKH09t9Xv\nJSIi0iBqPQPxM3onD14TgV/EeB1vt0XuIzpFREQknloSiPHAGTH2OxVbZTOKd+BkViWrRUREpE61\nJBBHYQWWKmkDDq6wzw6e24tqiEVERERyUEsCMaKKfYdVeNxdhXMZVv1RREREGkAtgyiXV7FvpUWn\n3AW05tYQRytY4ly/l2sUUsl7aBpy0bnHkM50Ftti5yJN6mziLTq1gejqkn2xg7kHmJ5ivI2sDRiV\ndxBS0VCsfr8U2yjidb9KfgZjaylJkxpPvARiRoXXmebZd2xawYqIiEhxvEZ44tANXEH0+IpBnteY\nlWqkIiIiUhinU0oY1gJXAzcBFwETYjz/Wue5G4E9UopRRERECqYDeJpSEjGL+DM6zvc879upRCci\nIiKF9WFsloWbDDxI9BTPQcDPPfv/Gg1oEhERaUnjgdcpJQVrgBuB44C9se6JI4HLgXc8+91B+ToY\nIiIi0mK2Be4k3syMNVi3RUcukYqIiEjh7Iet0PkWvROHudgqnR/OLToRERFJzP8DM2nJh15jEZEA\nAAAASUVORK5CYII=\n",
      "text/plain": [
       "<IPython.core.display.Image object>"
      ]
     },
     "metadata": {
      "image/png": {
       "height": 54,
       "width": 264
      }
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "eGrace = note.Note('E5', type='16th').getGrace()\n",
    "dGrace2 = note.Note('D5', type='16th').getGrace()\n",
    "eGrace.beams.fill(2, 'start')\n",
    "dGrace2.beams.fill(2, 'stop')\n",
    "m.insert(3.0, eGrace)\n",
    "m.insert(3.0, dGrace2)\n",
    "m.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Notice that the grace notes are ordered according to the principle, \"first inserted = left-most, last inserted = right-most.\"  If you know every note to be inserted in advance, then there's no problem getting the order right. But suppose you need to change it later?  In this case, change the priority of the grace notes:"
   ]
  },
  {
   "cell_type": "code",
   "exec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ESkQfUkEFPxqoXFqWBVHuNs6bu8uI5YREREpAD1JBAja9h2eJX73VU4l2K1DkRERKQH\nqGcQ5ac1bFtt0Sl3Aa1ZdcTRDJ4FfgU8X3QgEusOrBKllNeL2L70m6IDkVh3A9sUHYRk5xxs/Yxq\np3ZsZc4o/bFui07gogzjFRERkRIYR7IE4ooqz3O6b9uxWQUrIiIi5fFnohOHDuA64sdXDPI9x0OZ\nRioiIiKlcQZewrAKuAnru7ocGJ/g8bc4j10D7JZRjCIiIlIyfYFX8ZKIh0g+o+NffI/7t0yiExER\nkdLaCptl4SYDvyV+iucg4Ebf9g+TrJ6EiIiI9DLjgHl4ScEK4E7gK8BeWPfEUcC1wELfdvfTdR0M\nERERaTKbAg+QbGbGCqzbom8hkYqIiEjp7I2t0Pkh3ROHWdgqnVsVFp2IiIik5v8BeybAOuIIjxwA\nAAAASUVORK5CYII=\n",
      "text/plain": [
       "<IPython.core.display.Image object>"
      ]
     },
     "metadata": {
      "image/png": {
       "height": 54,
       "width": 264
      }
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "dGrace2.priority = -1\n",
    "m.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Note that the default priority of all objects is 0, so that by giving a priority higher than 1, the grace notes can be made to follow the main note:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAgkAAABtCAYAAAArmPKdAAAACXBIWXMAAB7CAAAewgFu0HU+AAAW\nZElEQVR4nO3de5QU5ZnH8e8ww8AogqKioAiiIqIiXlZQ3BU1XjFEVxM1cQOJxmi8x71qsu4qq8nq\nqkm8EC/rZaPH7HpBPccYjW5MBDUqq0YFjRdURAKiIiADDMz+8VTZNdVV1dXddZvu3+ecPlPdXdX9\nzLw93U/X+77P24KIiIg0gjZgd2ASsL/zc1dgZT0PKCIiIr3PIGAipaRgAjAgySdQkiAiIlJ8LcAo\n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PSEsAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<IPython.core.display.Image object>"
      ]
     },
     "metadata": {
      "image/png": {
       "height": 54,
       "width": 260
      }
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "dGrace2.priority = 1\n",
    "eGrace.priority = 2\n",
    "m.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "This is useful for cases such as putting a \"Nachschlag\" or \"Nachschlagen\" after a trill:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAcoAAAB+CAYAAACksFELAAAACXBIWXMAAB7CAAAewgFu0HU+AAAW\nKUlEQVR4nO3de7wcZX3H8c9JTq6EhKQxkHCNkWshCREQBKSAGFtKXkUEUUoFaktEEAHDrcQKUgRL\nDfXCTSgUAUG5G6soUKDcKwgYyEUghBByISGXk+s5Jzn+8ZthZ2dnZmd357Z7vu/Xa1+72Xlm9jmw\ns7+Z5/J7QIrqaGBE3pUQEREpiqHO8zjgOuC9HOsiIiJSOH8E1gE9zmNmvtURERGA9rwrIAAMBvYE\n+nre+31OdREREY8+eVdAAJhIeZAEBUoRkUJQoCyG/QLeU6AUESkABcpi+Ljv34uAJXlUREREyilQ\nFoP/jlJ3kyIiBaFAmb+tgD187ylQiogUhAJl/val8v+DAqWISEEoUObP3z8JCpQiIoWheZT58/dP\nvg0sDyg3FGui7QfMAVZ4tm0LHAQMAGYBryVeSxERkZy8TikbTw/wC8+2bYCzgVd8ZbqB/wK2Bq4H\nNvu2/9LZV0REpPB2Bb4L/Bp4Evg5cA4wGhhCZZC7ALsznAasxO4cHwJm+8r1YHeeK4AzsMw+BwKP\nONtuyuKPExERacQZQCd2R3gbcDPwHBYcO7E7P3/wuxFYAKwFpgODnGO1A2/6ym6m1HQ7DAvILznb\n1gBtaf5xIiIijTgG2AKcFrBtHHAXlUGyx9nnVuyO0+8xX9nfOe8PB94IONbQ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mvHkkd3Y61CIq1gKNCnjfDFk5PUTmlQznrsZAIY\nC9zjvD4MnWAiza4HjVIXSdR2lJped865LiIiIhXyzp263vN669xqISIiEiLvQLnJ83pQbrUQEREJ\n0Wig/AzwALAMC3pzsakdA2Puv8XzupZEBSIiIoXWDtxK+FSPp7ARcNVs5dnngCplRUREmsb1VJ8X\neVuM44z0lN8nlZqKiIhkbDzWZFotUG6hekaDsZ7y41Kqr4iISN3q6aOcQrx5Um3Y4sxRdvS8XlZH\nXURERFJVT6AcU0PZUVW2u3eRK7EckSIiIoVST6BcVUPZpVW2uwnRZ9dRDxERkdTVEyjj5obtBn4T\nsb0/MNl5/as66iEiIlJI44m3GsgVVY7zFU/ZvdKqrIiISB7mEz3a9Rqi71aHeI7xQKo1FRERycE/\nUQqMG4DrsHmTlwMTY+x/g7NvNzAhpTqKiIjkpi/lCzQ/QPz+zgs8+12USu1EREQKYCdsVKsb9P6X\n6KkjQ4Afe8o/iNatExGRFjceWEAp+K3DcsAeB+yHNaseDcwAlnjK3YuNehUREWl52wL3EW8k7Dqs\nubVvLjUVERHJ0YHATdg8S3+AnA1chjXXioiINI0/A9rPxj/8V2giAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<IPython.core.display.Image object>"
      ]
     },
     "metadata": {
      "image/png": {
       "height": 63,
       "width": 229
      }
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "p = stream.Part()\n",
    "m1 = stream.Measure()\n",
    "n2 = note.Note('F#5', type='whole')\n",
    "nach1 = note.Note('E5', type='16th').getGrace()\n",
    "nach2 = note.Note('F#5', type='16th').getGrace()\n",
    "nach1.priority = 1\n",
    "nach2.priority = 2\n",
    "\n",
    "trMark = expressions.Trill()\n",
    "n2.expressions.append(trMark)\n",
    "\n",
    "m1.insert(0, n2)\n",
    "m1.insert(0, nach1)\n",
    "m1.insert(0, nach2)\n",
    "\n",
    "p.append(m1)\n",
    "\n",
    "m2 = stream.Measure()\n",
    "nResolve = note.Note('G5', type='whole')\n",
    "m2.append(nResolve)\n",
    "p.append(m2)\n",
    "\n",
    "# nResolve is necessary because \n",
    "# MuseScore has a bug with spanners that end with grace notes.\n",
    "nachSlur = spanner.Slur([nach1, nach2, nResolve])\n",
    "p.insert(0, nachSlur)\n",
    "\n",
    "# beams are also created automagically on show\n",
    "p.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Stealing time\n",
    "\n",
    "`.stealTimePrevious` and `.stealTimeFollowing` are values from 0 to 1 that show what fraction of the previous or following note's durations should be allocated to make room for this grace note.\n",
    "\n",
    "MIDI output does not yet support playing back grace notes.\n",
    "\n",
    "## Appogiature\n",
    "\n",
    "[ TODO: To be written ]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "sphinx_links": {
     "any": true
    }
   },
   "source": [
    "That's enough on grace notes for now.  Let's move to finding things with something to say: :ref:`Chapter 28: Lyric Searching <usersGuide_28_lyricSearcher>`"
   ]
  }
 ],
 "metadata": {
  "anaconda-cloud": {},
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 1
}
